home *** CD-ROM | disk | FTP | other *** search
/ Amiga Tools 5 / Amiga Tools 5.iso / tools / developer-tools / aros / source / exec / internal / m68k / userstate.s < prev   
Encoding:
Text File  |  1996-07-16  |  793 b   |  52 lines

  1. |*****************************************************************************
  2. |
  3. |   NAME
  4. |
  5. |    __AROS_LH1(void, UserState,
  6. |
  7. |   SYNOPSIS
  8. |    __AROS_LA(APTR, sysStack, D0),
  9. |
  10. |   LOCATION
  11. |    struct ExecBase *, SysBase, 26, Exec)
  12. |
  13. |   FUNCTION
  14. |    Return to user mode after a call to SuperState().
  15. |
  16. |   INPUTS
  17. |    sysStack - The returncode from SuperState().
  18. |
  19. |   RESULT
  20. |
  21. |   NOTES
  22. |
  23. |   EXAMPLE
  24. |
  25. |   BUGS
  26. |
  27. |   SEE ALSO
  28. |    SuperState(), Supervisor()
  29. |
  30. |   INTERNALS
  31. |
  32. |   HISTORY
  33. |
  34. |******************************************************************************
  35.  
  36.     .globl    _Exec_UserState
  37. _Exec_UserState:
  38.     | simply return if argument is NULL
  39.     tstl    d0
  40.     jne    nonzero
  41.     rts
  42. nonzero:
  43.     | Transfer sp
  44.     movel    sp,usp
  45.  
  46.     | Set old supervisor sp
  47.     movel    d0,sp
  48.  
  49.     | And return. This jumps directly to a rts.
  50.     rte
  51.  
  52.